Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2499: Status update regression. #2503

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

digit-google
Copy link
Contributor

PR #2487 introduced a regression, where a completed command without an output would force a newline, preventing the next status update to appear on the same line in smart terminals.

This fixes the issue by adding the missing !outputs.empty() condition + adding a proper regression test to catch future breaks.

Fixed: #2499

If False (the default), this runs Ninja in a pty to simulate
a smart terminal (this feature cannot work on Windows!).

raw_output: set to True to return the raw, unfilted command
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfiltered

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Thanks.

env: Optional environment dictionary to run the command in.

Returns:
An UTF-8 corresponding to the output (stdout only) of the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing "string"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed :-)

@jhasse jhasse added this to the 1.13.0 milestone Sep 30, 2024
PR ninja-build#2487 introduced a regression, where a completed command without
an output would force a newline, preventing the next status update
to appear on the same line in smart terminals.

This fixes the issue by adding the missing `!outputs.empty()`
condition + adding a proper regression test to catch future
breaks.

Fixed: ninja-build#2499
@jhasse jhasse merged commit 4c59ee0 into ninja-build:master Oct 1, 2024
11 checks passed
@digit-google digit-google deleted the fix-output-regression branch October 30, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ninja lost the ability to print compiled file names in the same line
2 participants